POV-Ray : Newsgroups : povray.general : Is it me or does rand(n) loop ? : Re: Is it me or does rand(n) loop ? Server Time
5 Aug 2024 02:23:23 EDT (-0400)
  Re: Is it me or does rand(n) loop ?  
From: Thorsten Froehlich
Date: 18 Dec 2002 13:41:03
Message: <3e00c13f@news.povray.org>
In article <web.3e00a576fc9687d9f765b2b40@news.povray.org> , "BlackRose" 
<nomail@nomail> wrote:

> Anyways, it seemed that no matter what bounds I used, I was getting square
> grids of objects (instead of the randomly placed ones I wanted). Upon
> debugging, I found that (atleast to 5 decimal places) the values popped out
> by a particular rand stream repeated (which is not what I had expected.
> BTW, I'm doing this on a winXP machine, with pov version 3.5...
>
> Any suggestions on how to get 'round this ? Anyone else come across this
> before ? I guess I could create new random number streams, but I don't know

What you are seeing cannot be avoided with pure digital logic.  Thus there
is no way around it using pure digital logic; the "random" numbers will
always have a certain bias, no matter how you create them.  You can only
make them more or less close to "perfect" random numbers.  Search Google for
"random number generator" and you will get many links to almost as many
different (pseudo) random number generators.

    Thorsten


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.